# $Id: PKGBUILD 75438 2012-08-23 21:00:37Z lfleischer $
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: totoloco <totoloco at gmx>

pkgname=tabbed
pkgver=0.4.1
pkgrel=1
pkgdesc='Simple generic tabbed fronted to xembed aware applications.'
arch=('i686' 'x86_64')
url='http://tools.suckless.org/tabbed'
license=('custom:MIT/X')
depends=('libx11')
install='tabbed.install'
source=("http://dl.suckless.org/tools/${pkgname}-${pkgver}.tar.gz"
        'config.h')
md5sums=('6349b763f8a4d5e42d18245169fb136c'
         '5aa6c1fdc7971b21363704391bea6e1b')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  cp "${srcdir}/config.h" config.h

  sed -i 's/CPPFLAGS =/CPPFLAGS +=/g' config.mk
  sed -i 's/CFLAGS =/CFLAGS +=/g' config.mk
  sed -i 's/LDFLAGS =/LDFLAGS +=/g' config.mk

  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  make PREFIX=/usr DESTDIR="${pkgdir}" install
  install -Dm0644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
